import layout from '@/components/layout/index'

const routes = [
        {
            path: '/login',
            name: 'login',
            meta: {
                title: "登录"
            },
            component: () => import('@/views/login/login.vue')
        },
        {
            path: '/register',
            name: 'register',
            meta: {
                title: "注册"
            },
            component: () => import('@/views/register/register.vue')
        },


        {
            path: '/sysUser',
            name: 'sysUser',
            component: layout,
            redirect: '/sysUser',
            children: [
                {
                    path: '/sysUser',
                    name: 'sysUser',
                    meta: {
                        title: "系统用户"
                    },
                    component: () => import('@/views/sysuser/sys_user.vue'),
                }
            ]
        },

        {
            path: '/user',
            name: 'user',
            component: layout,
            redirect: '/user',
            children: [
                {
                    path: '/user',
                    name: 'user',
                    meta: {
                        title: "用户管理"
                    },
                    component: () => import('@/views/user/user_list.vue'),
                }
            ]
        },

        {
            path: '/foodList',
            name: 'foodList',
            component: layout,
            redirect: '/foodList',
            children: [
                {
                    path: '/foodList',
                    name: 'foodList',
                    meta: {
                        title: "美食管理"
                    },
                    component: () => import('@/views/food/food_list.vue'),
                }
            ]
        },

        {
            path: '/feedback',
            name: 'feedback',
            component: layout,
            redirect: '/feedback',
            children: [
                {
                    path: '/feedback',
                    name: 'feedback',
                    meta: {
                        title: "反馈管理"
                    },
                    component: () => import('@/views/feedback/feedback.vue'),
                }
            ]
        },

        {
            path: '/foodType',
            name: 'foodType',
            component: layout,
            redirect: '/foodType',
            children: [
                {
                    path: '/foodType',
                    name: 'foodType',
                    meta: {
                        title: "美食类型管理"
                    },
                    component: () => import('@/views/food_type/food_type.vue'),
                }
            ]
        },

        {
            path: '/foodComment',
            name: 'foodComment',
            component: layout,
            redirect: '/foodComment',
            children: [
                {
                    path: '/foodComment',
                    name: 'foodComment',
                    meta: {
                        title: "美食评论管理"
                    },
                    component: () => import('@/views/comment/comment.vue'),
                }
            ]
        },


        {
            path: '/bannerList',
            name: 'bannerList',
            component: layout,
            redirect: '/bannerList',
            children: [
                {
                    path: '/bannerList',
                    name: 'bannerList',
                    meta: {
                        title: "广告列表"
                    },
                    component: () => import('@/views/operating/sys_banner.vue'),
                }
            ]
        },

        {
            path: '/mineNotes',
            name: 'mineNotes',
            component: layout,
            redirect: '/mineNotes',
            children: [
                {
                    path: '/mineNotes',
                    name: 'mineNotes',
                    meta: {
                        title: "笔记管理"
                    },
                    component: () => import('@/views/mine_notes/mine_notes.vue'),
                }
            ]
        },
        {
            path: '/mineCook',
            name: 'mineCook',
            component: layout,
            redirect: '/mineCook',
            children: [
                {
                    path: '/mineCook',
                    name: 'mineCook',
                    meta: {
                        title: "食谱管理"
                    },
                    component: () => import('@/views/mine_cook/mine_cook.vue'),
                }
            ]
        },
        {
            path: '/likeList',
            name: 'likeList',
            component: layout,
            redirect: '/likeList',
            children: [
                {
                    path: '/likeList',
                    name: 'likeList',
                    meta: {
                        title: "点赞管理"
                    },
                    component: () => import('@/views/like_list/like_list.vue'),
                }
            ]
        },
    ]
;

export default routes;
